package java7_24;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Set;

public class Streamzuoye5 {
	public static void main(String[] args) {
		int[] arr={1,2,3};
		int[] arrb={4,5,3,2};
		int[] data=new int[arr.length+arrb.length];
		System.arraycopy(arr, 0, data, 0, arr.length);
		System.arraycopy(arrb, 0, data, arr.length, arrb.length);
		System.out.println(Arrays.toString(data));
		LinkedHashMap<Integer,Integer> map=new LinkedHashMap<Integer,Integer>();
		ArrayList<Integer> list=new ArrayList<>();
		for(int  i:data){
			list.add(i);
		}
		list.stream().forEach();
		list.stream().filter(t->map.containsKey(t)).forEach(t->map.put(t, map.get(t)+1));
		Set<Integer> keySet = map.keySet();
		keySet.stream().filter(t->map.get(t)==1).forEach(t->System.out.println(t));
	}
}
